(0) Obligation:

Clauses:

delete(X, tree(X, void, Right), Right).
delete(X, tree(X, Left, void), Left).
delete(X, tree(X, Left, Right), tree(Y, Left, Right1)) :- delmin(Right, Y, Right1).
delete(X, tree(Y, Left, Right), tree(Y, Left1, Right)) :- ','(less(X, Y), delete(X, Left, Left1)).
delete(X, tree(Y, Left, Right), tree(Y, Left, Right1)) :- ','(less(Y, X), delete(X, Right, Right1)).
delmin(tree(Y, void, Right), Y, Right).
delmin(tree(X, Left, X1), Y, tree(X, Left1, X2)) :- delmin(Left, Y, Left1).
less(0, s(X3)).
less(s(X), s(Y)) :- less(X, Y).

Query: delete(g,a,g)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

delminA(tree(X1, X2, X3), X4, tree(X1, X5, X6)) :- delminA(X2, X4, X5).
lessG(s(X1), s(X2)) :- lessG(X1, X2).
pD(X1, X2, X3, X4) :- lessG(X1, X2).
pD(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deleteB(X2, X3, X4)).
pC(X1, X2, X3, X4) :- lessG(X1, X2).
pC(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deleteB(X1, X3, X4)).
pE(X1, X2, X3, X4) :- lessG(X1, X2).
pE(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deleteB(s(X1), X3, X4)).
pF(X1, X2, X3, X4) :- lessG(X1, X2).
pF(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deleteB(s(X2), X3, X4)).
deleteB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delminA(X4, X6, X7).
deleteB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- pC(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deleteB(0, X2, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pE(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deleteB(s(X1), X3, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- pF(X2, X1, X4, X5).
deleteB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delminA(X4, X6, X7).
deleteB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- pC(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deleteB(0, X2, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pE(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deleteB(s(X1), X3, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- pF(X2, X1, X4, X5).
deleteB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delminA(X4, X6, X7).
deleteB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- pC(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deleteB(0, X2, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pE(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deleteB(s(X1), X3, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- pF(X2, X1, X4, X5).
deleteB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delminA(X4, X6, X7).
deleteB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- pC(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deleteB(0, X2, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- pE(X1, X2, X3, X5).
deleteB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- pD(X2, X1, X4, X5).
deleteB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deleteB(s(X1), X3, X4).
deleteB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- pF(X2, X1, X4, X5).

Clauses:

delmincA(tree(X1, void, X2), X1, X2).
delmincA(tree(X1, X2, X3), X4, tree(X1, X5, X6)) :- delmincA(X2, X4, X5).
deletecB(X1, tree(X1, void, X2), X2).
deletecB(X1, tree(X1, X2, void), X2).
deletecB(X1, tree(X1, X2, tree(X3, void, X4)), tree(X3, X2, X4)).
deletecB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delmincA(X4, X6, X7).
deletecB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- qcC(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deletecB(0, X2, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcE(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deletecB(s(X1), X3, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- qcF(X2, X1, X4, X5).
deletecB(X1, tree(X1, X2, tree(X3, void, X4)), tree(X3, X2, X4)).
deletecB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delmincA(X4, X6, X7).
deletecB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- qcC(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deletecB(0, X2, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcE(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deletecB(s(X1), X3, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- qcF(X2, X1, X4, X5).
deletecB(X1, tree(X1, X2, void), X2).
deletecB(X1, tree(X1, X2, tree(X3, void, X4)), tree(X3, X2, X4)).
deletecB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delmincA(X4, X6, X7).
deletecB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- qcC(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deletecB(0, X2, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcE(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deletecB(s(X1), X3, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- qcF(X2, X1, X4, X5).
deletecB(X1, tree(X1, X2, tree(X3, void, X4)), tree(X3, X2, X4)).
deletecB(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) :- delmincA(X4, X6, X7).
deletecB(X1, tree(X2, X3, X4), tree(X2, X5, X4)) :- qcC(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) :- deletecB(0, X2, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) :- qcE(X1, X2, X3, X5).
deletecB(X1, tree(X2, X3, X4), tree(X2, X3, X5)) :- qcD(X2, X1, X4, X5).
deletecB(s(X1), tree(0, X2, X3), tree(0, X2, X4)) :- deletecB(s(X1), X3, X4).
deletecB(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) :- qcF(X2, X1, X4, X5).
lesscG(0, s(X1)).
lesscG(s(X1), s(X2)) :- lesscG(X1, X2).
qcD(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deletecB(X2, X3, X4)).
qcC(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deletecB(X1, X3, X4)).
qcE(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deletecB(s(X1), X3, X4)).
qcF(X1, X2, X3, X4) :- ','(lesscG(X1, X2), deletecB(s(X2), X3, X4)).

Afs:

deleteB(x1, x2, x3)  =  deleteB(x1, x3)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
deleteB_in: (b,f,b)
delminA_in: (f,b,b)
pC_in: (b,b,f,b)
lessG_in: (b,b)
lesscG_in: (b,b)
pD_in: (b,b,f,b)
pE_in: (b,b,f,b)
pF_in: (b,b,f,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

DELETEB_IN_GAG(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) → U15_GAG(X1, X2, X3, X4, X5, X6, X7, X8, delminA_in_agg(X4, X6, X7))
DELETEB_IN_GAG(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) → DELMINA_IN_AGG(X4, X6, X7)
DELMINA_IN_AGG(tree(X1, X2, X3), X4, tree(X1, X5, X6)) → U1_AGG(X1, X2, X3, X4, X5, X6, delminA_in_agg(X2, X4, X5))
DELMINA_IN_AGG(tree(X1, X2, X3), X4, tree(X1, X5, X6)) → DELMINA_IN_AGG(X2, X4, X5)
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → U16_GAG(X1, X2, X3, X4, X5, pC_in_ggag(X1, X2, X3, X5))
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → PC_IN_GGAG(X1, X2, X3, X5)
PC_IN_GGAG(X1, X2, X3, X4) → U6_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PC_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
LESSG_IN_GG(s(X1), s(X2)) → U2_GG(X1, X2, lessG_in_gg(X1, X2))
LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)
PC_IN_GGAG(X1, X2, X3, X4) → U7_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U7_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U8_GGAG(X1, X2, X3, X4, deleteB_in_gag(X1, X3, X4))
U7_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X1, X3, X4)
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U17_GAG(X1, X2, X3, X4, X5, pD_in_ggag(X2, X1, X4, X5))
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PD_IN_GGAG(X2, X1, X4, X5)
PD_IN_GGAG(X1, X2, X3, X4) → U3_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PD_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
PD_IN_GGAG(X1, X2, X3, X4) → U4_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U4_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U5_GGAG(X1, X2, X3, X4, deleteB_in_gag(X2, X3, X4))
U4_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X2, X3, X4)
DELETEB_IN_GAG(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → U18_GAG(X1, X2, X3, X4, deleteB_in_gag(0, X2, X4))
DELETEB_IN_GAG(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → DELETEB_IN_GAG(0, X2, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → U19_GAG(X1, X2, X3, X4, X5, pE_in_ggag(X1, X2, X3, X5))
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → PE_IN_GGAG(X1, X2, X3, X5)
PE_IN_GGAG(X1, X2, X3, X4) → U9_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PE_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
PE_IN_GGAG(X1, X2, X3, X4) → U10_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U10_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U11_GGAG(X1, X2, X3, X4, deleteB_in_gag(s(X1), X3, X4))
U10_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X1), X3, X4)
DELETEB_IN_GAG(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → U20_GAG(X1, X2, X3, X4, deleteB_in_gag(s(X1), X3, X4))
DELETEB_IN_GAG(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → DELETEB_IN_GAG(s(X1), X3, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U21_GAG(X1, X2, X3, X4, X5, pF_in_ggag(X2, X1, X4, X5))
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → PF_IN_GGAG(X2, X1, X4, X5)
PF_IN_GGAG(X1, X2, X3, X4) → U12_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PF_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
PF_IN_GGAG(X1, X2, X3, X4) → U13_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U13_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U14_GGAG(X1, X2, X3, X4, deleteB_in_gag(s(X2), X3, X4))
U13_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X2), X3, X4)

The TRS R consists of the following rules:

lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U31_gg(X1, X2, lesscG_in_gg(X1, X2))
U31_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
deleteB_in_gag(x1, x2, x3)  =  deleteB_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
delminA_in_agg(x1, x2, x3)  =  delminA_in_agg(x2, x3)
pC_in_ggag(x1, x2, x3, x4)  =  pC_in_ggag(x1, x2, x4)
lessG_in_gg(x1, x2)  =  lessG_in_gg(x1, x2)
s(x1)  =  s(x1)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U31_gg(x1, x2, x3)  =  U31_gg(x1, x2, x3)
pD_in_ggag(x1, x2, x3, x4)  =  pD_in_ggag(x1, x2, x4)
pE_in_ggag(x1, x2, x3, x4)  =  pE_in_ggag(x1, x2, x4)
pF_in_ggag(x1, x2, x3, x4)  =  pF_in_ggag(x1, x2, x4)
DELETEB_IN_GAG(x1, x2, x3)  =  DELETEB_IN_GAG(x1, x3)
U15_GAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U15_GAG(x1, x2, x3, x6, x7, x8, x9)
DELMINA_IN_AGG(x1, x2, x3)  =  DELMINA_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4, x5, x6, x7)  =  U1_AGG(x1, x4, x5, x6, x7)
U16_GAG(x1, x2, x3, x4, x5, x6)  =  U16_GAG(x1, x2, x4, x5, x6)
PC_IN_GGAG(x1, x2, x3, x4)  =  PC_IN_GGAG(x1, x2, x4)
U6_GGAG(x1, x2, x3, x4, x5)  =  U6_GGAG(x1, x2, x4, x5)
LESSG_IN_GG(x1, x2)  =  LESSG_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x1, x2, x3)
U7_GGAG(x1, x2, x3, x4, x5)  =  U7_GGAG(x1, x2, x4, x5)
U8_GGAG(x1, x2, x3, x4, x5)  =  U8_GGAG(x1, x2, x4, x5)
U17_GAG(x1, x2, x3, x4, x5, x6)  =  U17_GAG(x1, x2, x3, x5, x6)
PD_IN_GGAG(x1, x2, x3, x4)  =  PD_IN_GGAG(x1, x2, x4)
U3_GGAG(x1, x2, x3, x4, x5)  =  U3_GGAG(x1, x2, x4, x5)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
U5_GGAG(x1, x2, x3, x4, x5)  =  U5_GGAG(x1, x2, x4, x5)
U18_GAG(x1, x2, x3, x4, x5)  =  U18_GAG(x1, x3, x4, x5)
U19_GAG(x1, x2, x3, x4, x5, x6)  =  U19_GAG(x1, x2, x4, x5, x6)
PE_IN_GGAG(x1, x2, x3, x4)  =  PE_IN_GGAG(x1, x2, x4)
U9_GGAG(x1, x2, x3, x4, x5)  =  U9_GGAG(x1, x2, x4, x5)
U10_GGAG(x1, x2, x3, x4, x5)  =  U10_GGAG(x1, x2, x4, x5)
U11_GGAG(x1, x2, x3, x4, x5)  =  U11_GGAG(x1, x2, x4, x5)
U20_GAG(x1, x2, x3, x4, x5)  =  U20_GAG(x1, x2, x4, x5)
U21_GAG(x1, x2, x3, x4, x5, x6)  =  U21_GAG(x1, x2, x3, x5, x6)
PF_IN_GGAG(x1, x2, x3, x4)  =  PF_IN_GGAG(x1, x2, x4)
U12_GGAG(x1, x2, x3, x4, x5)  =  U12_GGAG(x1, x2, x4, x5)
U13_GGAG(x1, x2, x3, x4, x5)  =  U13_GGAG(x1, x2, x4, x5)
U14_GGAG(x1, x2, x3, x4, x5)  =  U14_GGAG(x1, x2, x4, x5)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

DELETEB_IN_GAG(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) → U15_GAG(X1, X2, X3, X4, X5, X6, X7, X8, delminA_in_agg(X4, X6, X7))
DELETEB_IN_GAG(X1, tree(X1, X2, tree(X3, X4, X5)), tree(X6, X2, tree(X3, X7, X8))) → DELMINA_IN_AGG(X4, X6, X7)
DELMINA_IN_AGG(tree(X1, X2, X3), X4, tree(X1, X5, X6)) → U1_AGG(X1, X2, X3, X4, X5, X6, delminA_in_agg(X2, X4, X5))
DELMINA_IN_AGG(tree(X1, X2, X3), X4, tree(X1, X5, X6)) → DELMINA_IN_AGG(X2, X4, X5)
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → U16_GAG(X1, X2, X3, X4, X5, pC_in_ggag(X1, X2, X3, X5))
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → PC_IN_GGAG(X1, X2, X3, X5)
PC_IN_GGAG(X1, X2, X3, X4) → U6_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PC_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
LESSG_IN_GG(s(X1), s(X2)) → U2_GG(X1, X2, lessG_in_gg(X1, X2))
LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)
PC_IN_GGAG(X1, X2, X3, X4) → U7_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U7_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U8_GGAG(X1, X2, X3, X4, deleteB_in_gag(X1, X3, X4))
U7_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X1, X3, X4)
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → U17_GAG(X1, X2, X3, X4, X5, pD_in_ggag(X2, X1, X4, X5))
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PD_IN_GGAG(X2, X1, X4, X5)
PD_IN_GGAG(X1, X2, X3, X4) → U3_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PD_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
PD_IN_GGAG(X1, X2, X3, X4) → U4_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U4_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U5_GGAG(X1, X2, X3, X4, deleteB_in_gag(X2, X3, X4))
U4_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X2, X3, X4)
DELETEB_IN_GAG(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → U18_GAG(X1, X2, X3, X4, deleteB_in_gag(0, X2, X4))
DELETEB_IN_GAG(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → DELETEB_IN_GAG(0, X2, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → U19_GAG(X1, X2, X3, X4, X5, pE_in_ggag(X1, X2, X3, X5))
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → PE_IN_GGAG(X1, X2, X3, X5)
PE_IN_GGAG(X1, X2, X3, X4) → U9_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PE_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
PE_IN_GGAG(X1, X2, X3, X4) → U10_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U10_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U11_GGAG(X1, X2, X3, X4, deleteB_in_gag(s(X1), X3, X4))
U10_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X1), X3, X4)
DELETEB_IN_GAG(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → U20_GAG(X1, X2, X3, X4, deleteB_in_gag(s(X1), X3, X4))
DELETEB_IN_GAG(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → DELETEB_IN_GAG(s(X1), X3, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → U21_GAG(X1, X2, X3, X4, X5, pF_in_ggag(X2, X1, X4, X5))
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → PF_IN_GGAG(X2, X1, X4, X5)
PF_IN_GGAG(X1, X2, X3, X4) → U12_GGAG(X1, X2, X3, X4, lessG_in_gg(X1, X2))
PF_IN_GGAG(X1, X2, X3, X4) → LESSG_IN_GG(X1, X2)
PF_IN_GGAG(X1, X2, X3, X4) → U13_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U13_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → U14_GGAG(X1, X2, X3, X4, deleteB_in_gag(s(X2), X3, X4))
U13_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X2), X3, X4)

The TRS R consists of the following rules:

lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U31_gg(X1, X2, lesscG_in_gg(X1, X2))
U31_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
deleteB_in_gag(x1, x2, x3)  =  deleteB_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
delminA_in_agg(x1, x2, x3)  =  delminA_in_agg(x2, x3)
pC_in_ggag(x1, x2, x3, x4)  =  pC_in_ggag(x1, x2, x4)
lessG_in_gg(x1, x2)  =  lessG_in_gg(x1, x2)
s(x1)  =  s(x1)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U31_gg(x1, x2, x3)  =  U31_gg(x1, x2, x3)
pD_in_ggag(x1, x2, x3, x4)  =  pD_in_ggag(x1, x2, x4)
pE_in_ggag(x1, x2, x3, x4)  =  pE_in_ggag(x1, x2, x4)
pF_in_ggag(x1, x2, x3, x4)  =  pF_in_ggag(x1, x2, x4)
DELETEB_IN_GAG(x1, x2, x3)  =  DELETEB_IN_GAG(x1, x3)
U15_GAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U15_GAG(x1, x2, x3, x6, x7, x8, x9)
DELMINA_IN_AGG(x1, x2, x3)  =  DELMINA_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4, x5, x6, x7)  =  U1_AGG(x1, x4, x5, x6, x7)
U16_GAG(x1, x2, x3, x4, x5, x6)  =  U16_GAG(x1, x2, x4, x5, x6)
PC_IN_GGAG(x1, x2, x3, x4)  =  PC_IN_GGAG(x1, x2, x4)
U6_GGAG(x1, x2, x3, x4, x5)  =  U6_GGAG(x1, x2, x4, x5)
LESSG_IN_GG(x1, x2)  =  LESSG_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x1, x2, x3)
U7_GGAG(x1, x2, x3, x4, x5)  =  U7_GGAG(x1, x2, x4, x5)
U8_GGAG(x1, x2, x3, x4, x5)  =  U8_GGAG(x1, x2, x4, x5)
U17_GAG(x1, x2, x3, x4, x5, x6)  =  U17_GAG(x1, x2, x3, x5, x6)
PD_IN_GGAG(x1, x2, x3, x4)  =  PD_IN_GGAG(x1, x2, x4)
U3_GGAG(x1, x2, x3, x4, x5)  =  U3_GGAG(x1, x2, x4, x5)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
U5_GGAG(x1, x2, x3, x4, x5)  =  U5_GGAG(x1, x2, x4, x5)
U18_GAG(x1, x2, x3, x4, x5)  =  U18_GAG(x1, x3, x4, x5)
U19_GAG(x1, x2, x3, x4, x5, x6)  =  U19_GAG(x1, x2, x4, x5, x6)
PE_IN_GGAG(x1, x2, x3, x4)  =  PE_IN_GGAG(x1, x2, x4)
U9_GGAG(x1, x2, x3, x4, x5)  =  U9_GGAG(x1, x2, x4, x5)
U10_GGAG(x1, x2, x3, x4, x5)  =  U10_GGAG(x1, x2, x4, x5)
U11_GGAG(x1, x2, x3, x4, x5)  =  U11_GGAG(x1, x2, x4, x5)
U20_GAG(x1, x2, x3, x4, x5)  =  U20_GAG(x1, x2, x4, x5)
U21_GAG(x1, x2, x3, x4, x5, x6)  =  U21_GAG(x1, x2, x3, x5, x6)
PF_IN_GGAG(x1, x2, x3, x4)  =  PF_IN_GGAG(x1, x2, x4)
U12_GGAG(x1, x2, x3, x4, x5)  =  U12_GGAG(x1, x2, x4, x5)
U13_GGAG(x1, x2, x3, x4, x5)  =  U13_GGAG(x1, x2, x4, x5)
U14_GGAG(x1, x2, x3, x4, x5)  =  U14_GGAG(x1, x2, x4, x5)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 22 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)

The TRS R consists of the following rules:

lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U31_gg(X1, X2, lesscG_in_gg(X1, X2))
U31_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESSG_IN_GG(s(X1), s(X2)) → LESSG_IN_GG(X1, X2)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

DELMINA_IN_AGG(tree(X1, X2, X3), X4, tree(X1, X5, X6)) → DELMINA_IN_AGG(X2, X4, X5)

The TRS R consists of the following rules:

lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U31_gg(X1, X2, lesscG_in_gg(X1, X2))
U31_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U31_gg(x1, x2, x3)  =  U31_gg(x1, x2, x3)
DELMINA_IN_AGG(x1, x2, x3)  =  DELMINA_IN_AGG(x2, x3)

We have to consider all (P,R,Pi)-chains

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

DELMINA_IN_AGG(tree(X1, X2, X3), X4, tree(X1, X5, X6)) → DELMINA_IN_AGG(X2, X4, X5)

R is empty.
The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
DELMINA_IN_AGG(x1, x2, x3)  =  DELMINA_IN_AGG(x2, x3)

We have to consider all (P,R,Pi)-chains

(17) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

DELMINA_IN_AGG(X4, tree(X1, X5, X6)) → DELMINA_IN_AGG(X4, X5)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • DELMINA_IN_AGG(X4, tree(X1, X5, X6)) → DELMINA_IN_AGG(X4, X5)
    The graph contains the following edges 1 >= 1, 2 > 2

(20) YES

(21) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X5, X4)) → PC_IN_GGAG(X1, X2, X3, X5)
PC_IN_GGAG(X1, X2, X3, X4) → U7_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U7_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X1, X3, X4)
DELETEB_IN_GAG(X1, tree(X2, X3, X4), tree(X2, X3, X5)) → PD_IN_GGAG(X2, X1, X4, X5)
PD_IN_GGAG(X1, X2, X3, X4) → U4_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U4_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X2, X3, X4)
DELETEB_IN_GAG(0, tree(s(X1), X2, X3), tree(s(X1), X4, X3)) → DELETEB_IN_GAG(0, X2, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X5, X4)) → PE_IN_GGAG(X1, X2, X3, X5)
PE_IN_GGAG(X1, X2, X3, X4) → U10_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U10_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X1), X3, X4)
DELETEB_IN_GAG(s(X1), tree(0, X2, X3), tree(0, X2, X4)) → DELETEB_IN_GAG(s(X1), X3, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X4), tree(s(X2), X3, X5)) → PF_IN_GGAG(X2, X1, X4, X5)
PF_IN_GGAG(X1, X2, X3, X4) → U13_GGAG(X1, X2, X3, X4, lesscG_in_gg(X1, X2))
U13_GGAG(X1, X2, X3, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X2), X3, X4)

The TRS R consists of the following rules:

lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U31_gg(X1, X2, lesscG_in_gg(X1, X2))
U31_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
lesscG_in_gg(x1, x2)  =  lesscG_in_gg(x1, x2)
0  =  0
lesscG_out_gg(x1, x2)  =  lesscG_out_gg(x1, x2)
U31_gg(x1, x2, x3)  =  U31_gg(x1, x2, x3)
DELETEB_IN_GAG(x1, x2, x3)  =  DELETEB_IN_GAG(x1, x3)
PC_IN_GGAG(x1, x2, x3, x4)  =  PC_IN_GGAG(x1, x2, x4)
U7_GGAG(x1, x2, x3, x4, x5)  =  U7_GGAG(x1, x2, x4, x5)
PD_IN_GGAG(x1, x2, x3, x4)  =  PD_IN_GGAG(x1, x2, x4)
U4_GGAG(x1, x2, x3, x4, x5)  =  U4_GGAG(x1, x2, x4, x5)
PE_IN_GGAG(x1, x2, x3, x4)  =  PE_IN_GGAG(x1, x2, x4)
U10_GGAG(x1, x2, x3, x4, x5)  =  U10_GGAG(x1, x2, x4, x5)
PF_IN_GGAG(x1, x2, x3, x4)  =  PF_IN_GGAG(x1, x2, x4)
U13_GGAG(x1, x2, x3, x4, x5)  =  U13_GGAG(x1, x2, x4, x5)

We have to consider all (P,R,Pi)-chains

(22) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(23) Obligation:

Q DP problem:
The TRS P consists of the following rules:

DELETEB_IN_GAG(X1, tree(X2, X5, X4)) → PC_IN_GGAG(X1, X2, X5)
PC_IN_GGAG(X1, X2, X4) → U7_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
U7_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X1, X4)
DELETEB_IN_GAG(X1, tree(X2, X3, X5)) → PD_IN_GGAG(X2, X1, X5)
PD_IN_GGAG(X1, X2, X4) → U4_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
U4_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X2, X4)
DELETEB_IN_GAG(0, tree(s(X1), X4, X3)) → DELETEB_IN_GAG(0, X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X5, X4)) → PE_IN_GGAG(X1, X2, X5)
PE_IN_GGAG(X1, X2, X4) → U10_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
U10_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X1), X4)
DELETEB_IN_GAG(s(X1), tree(0, X2, X4)) → DELETEB_IN_GAG(s(X1), X4)
DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X5)) → PF_IN_GGAG(X2, X1, X5)
PF_IN_GGAG(X1, X2, X4) → U13_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
U13_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X2), X4)

The TRS R consists of the following rules:

lesscG_in_gg(0, s(X1)) → lesscG_out_gg(0, s(X1))
lesscG_in_gg(s(X1), s(X2)) → U31_gg(X1, X2, lesscG_in_gg(X1, X2))
U31_gg(X1, X2, lesscG_out_gg(X1, X2)) → lesscG_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lesscG_in_gg(x0, x1)
U31_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(24) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PC_IN_GGAG(X1, X2, X4) → U7_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3

  • U7_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X1, X4)
    The graph contains the following edges 1 >= 1, 4 > 1, 3 >= 2

  • DELETEB_IN_GAG(X1, tree(X2, X5, X4)) → PC_IN_GGAG(X1, X2, X5)
    The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3

  • PD_IN_GGAG(X1, X2, X4) → U4_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3

  • U4_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(X2, X4)
    The graph contains the following edges 2 >= 1, 4 > 1, 3 >= 2

  • DELETEB_IN_GAG(X1, tree(X2, X3, X5)) → PD_IN_GGAG(X2, X1, X5)
    The graph contains the following edges 2 > 1, 1 >= 2, 2 > 3

  • DELETEB_IN_GAG(0, tree(s(X1), X4, X3)) → DELETEB_IN_GAG(0, X4)
    The graph contains the following edges 1 >= 1, 2 > 2

  • DELETEB_IN_GAG(s(X1), tree(0, X2, X4)) → DELETEB_IN_GAG(s(X1), X4)
    The graph contains the following edges 1 >= 1, 2 > 2

  • PE_IN_GGAG(X1, X2, X4) → U10_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3

  • PF_IN_GGAG(X1, X2, X4) → U13_GGAG(X1, X2, X4, lesscG_in_gg(X1, X2))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3

  • U10_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X1), X4)
    The graph contains the following edges 3 >= 2

  • U13_GGAG(X1, X2, X4, lesscG_out_gg(X1, X2)) → DELETEB_IN_GAG(s(X2), X4)
    The graph contains the following edges 3 >= 2

  • DELETEB_IN_GAG(s(X1), tree(s(X2), X5, X4)) → PE_IN_GGAG(X1, X2, X5)
    The graph contains the following edges 1 > 1, 2 > 2, 2 > 3

  • DELETEB_IN_GAG(s(X1), tree(s(X2), X3, X5)) → PF_IN_GGAG(X2, X1, X5)
    The graph contains the following edges 2 > 1, 1 > 2, 2 > 3

(25) YES